import { http } from '@/utils/http'

let FixApi = ''
if (process.env.NODE_ENV == 'development') {
  FixApi = '/web' //开发环境
} else {
  FixApi = '/web' //生产环境
}

/**
 * 收藏列表
 */
export const queryFileCollectPage = (data : any) => {
  return http({
    method: 'POST',
    url: `${FixApi}/cl/fileCollect/queryFileCollectPage.json`,
    data,
  })
}
/**
 * 收藏统计
 */
export const queryFileCollectByUser = (data : any) => {
  return http({
    method: 'POST',
    url: `${FixApi}/cl/fileCollect/queryFileCollectByUser.json`,
    data,
  })
}

/**
 * 删除收藏 通过 fileCollectId
 */
export const deleteFileCollect = (data : any) => {
  return http({
    method: 'POST',
    url: `${FixApi}/cl/fileCollect/deleteFileCollect.json`,
    data,
  })
}
/**
 * 删除收藏 通过fileCollectCode
 */
export const deleteFileCollectByCode = (data : any) => {
  return http({
    method: 'POST',
    url: `${FixApi}/cl/fileCollect/deleteFileCollectByCode.json`,
    data,
  })
}
